package com.xiangban.yanglaodajie_platform.dao;

import com.xiangban.yanglaodajie_platform.entity.Goods;
import com.xiangban.yanglaodajie_platform.entity.ShoppingCart;
import com.xiangban.yanglaodajie_platform.entity.dto.GoodsDto;
import com.xiangban.yanglaodajie_platform.entity.dto.ShoppingCartDto;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author Mr. MaYaYun
 * @Data 2021/3/15 17:01
 */
@Repository
public interface GoodsMapper {

    List<GoodsDto> selectGoodsList(Map<String,Object> map);
    List<GoodsDto> findGoods(ShoppingCart shoppingCart);
    List<GoodsDto> getGoods(ShoppingCart shoppingCart);
    void updateById(ShoppingCart shoppingCart);
    List<Map<String,String>> checkShopType(List<Integer> goodsIds);

    /**
     * 更新商品库存
     * @param parameter 商品id 数量
     */
    void updateInventory (Map<String,Object> parameter);

    Goods findInfo(Integer id);
    void updateGoodsInfo(Goods goods);
}
